package project22;

import java.util.HashMap;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        HashMap<String, student> maps = new HashMap<>();
        Scanner sc=new Scanner(System.in);
        String key=new String();
        while(!(key=sc.next()).equals("end"))
        {
            String name=sc.next();
            int age=sc.nextInt();
            maps.put(key,new student(name,age));
        }
        String str=sc.next();
         if(maps.containsKey(str))
         {
             System.out.println(str+" "+maps.get(str).toString());
         }
         else
         {
             System.out.println("The student"+" "+str+" "+"does not exist");
         }
    }
}
class student
{
    private String name;
    private int age;

    public student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public student() {
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return name+" "+String.valueOf(age);
    }
}